from django.urls import re_path
from django.contrib.auth.views import LoginView

from . import views

app_name = 'users'


urlpatterns = [
	# 登录界面
	re_path(r'^login/$',LoginView.as_view(template_name='users/login.html'),name='login'),
	# 登出
	re_path(r'^logout/$',views.logout_view,name='logout'),
	# 注册
	re_path(r'^register/$',views.register,name='register'),
	# 个人中心
	re_path(r'^(?P<user_id>\d+)/$',views.homePage,name='homePage'),
	# 编辑个人中心
	re_path(r'^edit_home/$',views.edit_home,name='edit_home'),
	# 上传头像
	re_path(r'^uploadAvatar/$',views.upload_avatar,name='upload_avatar'),
	# 评论
	re_path(r'^comment/(?P<user_id>\d+)/$',views.comment,name='comment'),
	# 删除评论
	re_path(r'^delete_comment/(?P<comment_id>\d+)/$',views.delete_comment,name='delete_comment'),
]
